<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        button{
            width: 100px;
            height: 35px;
            text-align: center;
            font: 18px/35px "微软雅黑";
            margin: 0;
            padding: 0;
        }
        /* #btn{

        } */
    </style>
</head>
<body>
    <button id="btn">按钮</button>
    <div class="box"></div>
    <script>
        //获取元素,通过元素选择器来选择
        document.querySelector('#btn');
        document.querySelector('.box');
        console.log(document.querySelector('#btn'));
        console.log(document.querySelector('.box'));
        /*
            document.querySelector(选择器- css中使用的选择器)

        */
    </script>
</body>
</html>